class CreateDepositos < ActiveRecord::Migration
  def self.up
    create_table :depositos do |t|
      t.integer :ano, :null => false
      t.date    :data, :null => false
      t.decimal :valor, :precision => 14, :scale => 2, :null => false
      t.decimal :complementacao, :precision => 14, :scale => 2
      t.references :caracterizacao, :null => false

      t.timestamps
    end
    add_index :depositos, :caracterizacao_id
  end

  def self.down
    drop_table :depositos
  end
end
